package screen;

import java.awt.Graphics;
import java.util.ArrayList;
import java.util.List;

import screen.window.InterfaceWindow;
import screen.window.MenuWindow;
import screen.window.TilesetWindow;

import gameTypes.Drawable;

/**
 * @author Ben Elliott
 */
public class InterfaceScreen implements Drawable {
	
	/* Windows */
	List<InterfaceWindow> windows;
	TilesetWindow tilesetWindow;
	MenuWindow menuWindow;
	
	public InterfaceScreen() {
		// Create windows
		windows = new ArrayList<InterfaceWindow>();
		
		tilesetWindow = new TilesetWindow(300, 50);
		windows.add(tilesetWindow);
		menuWindow = new MenuWindow(100, 0);
		windows.add(menuWindow);
	}

	public void Load() {
		for (InterfaceWindow w : windows) {
			w.Load();
		}
	}
	
	@Override
	public void Update(float elapsed) {
		// Update each window
		for (InterfaceWindow w : windows) {
			w.Update(elapsed);
		}
	}

	@Override
	public void Draw(Graphics graphics) {
		// Draw each window
		for (InterfaceWindow w : windows) {
			w.Draw(graphics);
		}
	}
}
